﻿<?xml version="1.0" encoding="utf-8" ?>
<log4net>
  <!-- ConsoleOut is set to be a ConsoleAppender -->
  <appender name="ConsoleOut" type="log4net.Appender.ConsoleAppender">
    <!-- ConsoleAppender uses PatternLayout -->
    <layout type="log4net.Layout.PatternLayout">
      <!-- Print the date in ISO 8601 format -->
      <conversionPattern value="%date [%thread] %-5level %logger %ndc - %message%newline" />
    </layout>
  </appender>

  <!-- FileOut is set to be a RollingFileAppender -->
  <appender name="FileOut" type="log4net.Appender.RollingFileAppender">
    <file type="log4net.Util.PatternString" value="%env{APPDATA}\Surface\Logs\ScrumTable.UI.View.log" />
    <appendToFile value="true" />
    <maximumFileSize value="100KB" />
    <maxSizeRollBackups value="2" />

    <layout type="log4net.Layout.PatternLayout">
      <conversionPattern value="%date [%thread] %-5level %logger %ndc - %message%newline" />
    </layout>
  </appender>

  <!-- FileOutAction is set to be a RollingFileAppender -->
  <appender name="FileOut_DataActions" type="log4net.Appender.RollingFileAppender">
    <file type="log4net.Util.PatternString" value="%env{APPDATA}\Surface\Logs\ScrumTable.UI.View_DataActions.log" />
    <appendToFile value="true" />
    <maximumFileSize value="100KB" />
    <maxSizeRollBackups value="2" />

    <layout type="log4net.Layout.PatternLayout">
      <conversionPattern value="%date [%thread] %-5level %logger %ndc - %message%newline" />
    </layout>
  </appender>

  <!-- FileOutAction is set to be a RollingFileAppender -->
  <appender name="FileOut_Navigation" type="log4net.Appender.RollingFileAppender">
    <file type="log4net.Util.PatternString" value="%env{APPDATA}\Surface\Logs\ScrumTable.UI.View_Navigation.log" />
    <appendToFile value="true" />
    <maximumFileSize value="100KB" />
    <maxSizeRollBackups value="2" />

    <layout type="log4net.Layout.PatternLayout">
      <conversionPattern value="%date [%thread] %-5level %logger %ndc - %message%newline" />
    </layout>
  </appender>


  <!-- Set root logger level to DEBUG and its only appender to ConsoleOut -->
  <root>
    <level value="ERROR" />
  </root>

  <!-- Print ERROR,FATAL messages in the package ScrumTable -->
  <logger name="ScrumTable">
    <level value="ERROR" />
    <appender-ref ref="FileOut" />
  </logger>

  <!-- Print all messages in the package ScrumTable.UI.View -->
  <logger name="ScrumTable.UI.View">
    <level value="ALL" />
    <appender-ref ref="ConsoleOut" />
  </logger>

  <!-- Print all messages in the package ScrumTable.UI.ViewModel -->
  <logger name="ScrumTable.UI.ViewModel">
    <level value="ALL" />
    <appender-ref ref="ConsoleOut" />
  </logger>

  <!-- Print all messages in the package ScrumTable.Common -->
  <logger name="ScrumTable.Common">
    <level value="INFO" />
    <!--<appender-ref ref="ConsoleOut" />-->
  </logger>

  <!-- Print all messages in the package ScrumTable.BL.DM -->
  <logger name="ScrumTable.BL.DM">
    <level value="ALL" />
    <appender-ref ref="ConsoleOut" />
  </logger>

  <!-- Print all messages in the package ScrumTable.BL.DM.Logging -->
  <logger name="ScrumTable.BL.DM.DataManagement.Logging" additivity="false">
    <level value="INFO" />
    <appender-ref ref="FileOut_DataActions" />
  </logger>

  <!-- Print all messages in the package ScrumTable.UI.ViewModel.Logging -->
  <logger name="ScrumTable.UI.ViewModel.Logging" additivity="false">
    <level value="INFO" />
    <appender-ref ref="FileOut_Navigation" />
  </logger>

  <!-- Print all messages in the package ScrumTable.DL -->
  <logger name="ScrumTable.DL">
    <level value="WARN" />
    <appender-ref ref="ConsoleOut" />
  </logger>
</log4net>